local skel = fk.CreateSkill {
  name = "rmt__dajiaohuan",
}

Fk:loadTranslationTable{
  ["rmt__dajiaohuan"] = "大叫唤",
  [":rmt__dajiaohuan"] = "阶段开始时，你进行一次判定，若结果不为<font color='red'>♥</font>，你可以使用牌堆顶的一张牌；"..
  "若结果为<font color='red'>♥</font>，你啊啊啊啊啊啊啊啊啊啊！",

  ["#rmt__dajiaohuan-use"] = "大叫唤：你可以使用这张牌",

  ["$rmt__dajiaohuan1"] = "啊啊啊啊啊啊啊啊啊啊！",
}
skel:addEffect(fk.EventPhaseStart, {
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and player.phase >= Player.Start and player.phase <= Player.Finish
  end,
  on_cost = Util.TrueFunc,
  on_use = function (self, event, target, player, data)
    local room = player.room
    room:notifySkillInvoked(player, skel.name, "drawcard")
    local judge = {
      who = target,
      reason = self.name,
      pattern = ".|.|spade,club,diamond",
    }
    room:judge(judge)
    if judge:matchPattern() then
      local cards = {room.draw_pile[1]}
      if #cards > 0 then
        room:askToUseRealCard(player, {
          pattern = cards, skill_name = skel.name, skip = false, expand_pile = cards,
          prompt = "#rmt__dajiaohuan-use", extra_data = {
            bypass_times = true,
            extraUse = true,
            expand_pile = cards,
          }
        })
      end
    else
      player:chat("$rmt__dajiaohuan:1")
    end
  end,
})

return skel
